<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();
</script>
<body id="body">
 
    <img id='image' src="resources/cake.png" role="button" alt="alternate" title="title">
    
    <p id="description"></p>
    <div id="console"></div>
     
    <script>
        description("This test makes sure that a img acting as an aria button still returns its alt tag as the description");
 
        if (window.accessibilityController) {
            var result = document.getElementById("result");

            var imgUIElement = accessibilityController.accessibleElementById("image");
            shouldBe("imgUIElement.name", "'alternate'");
        }
    </script>
    
</body>
</html>
